import datetime
from haystack import indexes
from casestudy.models import Case
from haystack import site


class CaseIndex(indexes.RealTimeSearchIndex):
    text = indexes.CharField(document=True, use_template=True)

    def get_model(self):
        return Case


site.register(Case, CaseIndex)